import React, { Component } from 'react'
import globalContext from '../context'


export default class A extends Component {
    render() {
        return (
            <div>
                <h3>A--接收的数据(默认接收的数据)</h3>
                <globalContext.Consumer>
                    {
                        value=> {
                            return (
                                <div>
                                    <p>userName: {value.userName}</p>
                                    <p>age: {value.age}</p>
                                </div>
                            )
                        }
                    }
                </globalContext.Consumer>
            </div>
        )
    }
}
